package com.joolun.mall.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

@Data
@TableName("tb_work")
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "首页实习")
public class Work  extends Model<Work> {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "序号")
    @TableId(type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "标题")
    private String title;

    @ApiModelProperty(value = "图片")
    private String pic;

    @ApiModelProperty(value = "内容")
    private String content;

    @ApiModelProperty(value = "地址")
    private String address;

    @ApiModelProperty(value = "邮箱")
    private String email;

    @ApiModelProperty(value = "出勤")
    private String attendance;

    @ApiModelProperty(value = "时间")
    @TableField("work_time")
    private String workTime;

    @ApiModelProperty(value = "教育")
    private String edu;

    @ApiModelProperty(value = "可转正，无转正")
    private String formal;

    @ApiModelProperty(value = "工资")
    private String salary;

    @ApiModelProperty(value = "排序")
    private Integer orderNum;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "分类id")
    @TableField("cate_id")
    private Integer cateId;

    @TableField(exist = false)
    private String cateName;

    /**
     * 距离发布日期
     * 1周前,1个月前,3个月前,半年前,1年前
     */
    @ApiModelProperty(value = "距今")
    @TableField(exist = false)
    private String howLongAgo;

    /**
     * 投递人数统计
     */
    @ApiModelProperty(value = "投递人数统计")
    @TableField(exist = false)
    private Integer countClick;

}
